<cfsetting enablecfoutputonly="true" showdebugoutput="false">
<cfparam default="" name="action">
<cfswitch expression="#action#">
	<cfcase value="getDataSources">
		<cfoutput>#application.dataBaseService.getDataSourceNames()#</cfoutput>
	</cfcase>
	<cfcase value="getTableNames">
		<cfif NOT IsDefined('dsn')>
			<cfset dsn = "" />
		</cfif>
		<cfset application.dataBaseService.setDSN(dsn) />
		<cfset application.dataBaseService.setConnection(application.dataBaseService.getDataSourceService().getDataSource(application.dataBaseService.getdsn()).getConnection())>
		<cfset application.dataBaseService.setDBMetaData(application.dataBaseService.getConnection().getMetaData())>
		<cfset application.dataBaseService.getConnection().close()>
		<cfoutput>#application.dataBaseService.getTableNames()#</cfoutput>
		
	</cfcase>
	<cfcase value="getColumnInfo">
		<cfparam default="" name="dsn">
		<cfparam default="" name="tablename">
		<cfparam default="%" name="columnname">		
		<cfset application.dataBaseService.setDSN(dsn) />
		<cfset application.dataBaseService.setConnection(application.dataBaseService.getDataSourceService().getDataSource(application.dataBaseService.getdsn()).getConnection())>
		<cfset application.dataBaseService.setDBMetaData(application.dataBaseService.getConnection().getMetaData())>
		<cfset application.dataBaseService.getConnection().close()>
		<cfoutput>#application.dataBaseService.getColumnInfo(tablename,columnName)#</cfoutput>
	</cfcase>
</cfswitch>